Optimal. Leaf size=252 \[ -\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}+\frac {(e+f x) \cosh (c+d x)}{b d}+\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d}+\frac {\sqrt {a^2+b^2} f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d^2}-\frac {\sqrt {a^2+b^2} f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d^2}-\frac {f \sinh (c+d x)}{b d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.33, antiderivative size = 252, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {5684, 3377,
2717, 3403, 2296, 2221, 2317, 2438} \begin {gather*} \frac {f \sqrt {a^2+b^2} \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d^2}-\frac {f \sqrt {a^2+b^2} \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d^2}+\frac {\sqrt {a^2+b^2} (e+f x) \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}+1\right )}{b^2 d}-\frac {\sqrt {a^2+b^2} (e+f x) \log \left (\frac {b e^{c+d x}}{\sqrt {a^2+b^2}+a}+1\right )}{b^2 d}-\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}-\frac {f \sinh (c+d x)}{b d^2}+\frac {(e+f x) \cosh (c+d x)}{b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 2717
Rule 3377
Rule 3403
Rule 5684
Rubi steps
\begin {align*} \int \frac {(e+f x) \cosh ^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac {a \int (e+f x) \, dx}{b^2}+\frac {\int (e+f x) \sinh (c+d x) \, dx}{b}+\frac {\left (a^2+b^2\right ) \int \frac {e+f x}{a+b \sinh (c+d x)} \, dx}{b^2}\\ &=-\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}+\frac {(e+f x) \cosh (c+d x)}{b d}+\frac {\left (2 \left (a^2+b^2\right )\right ) \int \frac {e^{c+d x} (e+f x)}{-b+2 a e^{c+d x}+b e^{2 (c+d x)}} \, dx}{b^2}-\frac {f \int \cosh (c+d x) \, dx}{b d}\\ &=-\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}+\frac {(e+f x) \cosh (c+d x)}{b d}-\frac {f \sinh (c+d x)}{b d^2}+\frac {\left (2 \sqrt {a^2+b^2}\right ) \int \frac {e^{c+d x} (e+f x)}{2 a-2 \sqrt {a^2+b^2}+2 b e^{c+d x}} \, dx}{b}-\frac {\left (2 \sqrt {a^2+b^2}\right ) \int \frac {e^{c+d x} (e+f x)}{2 a+2 \sqrt {a^2+b^2}+2 b e^{c+d x}} \, dx}{b}\\ &=-\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}+\frac {(e+f x) \cosh (c+d x)}{b d}+\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {f \sinh (c+d x)}{b d^2}-\frac {\left (\sqrt {a^2+b^2} f\right ) \int \log \left (1+\frac {2 b e^{c+d x}}{2 a-2 \sqrt {a^2+b^2}}\right ) \, dx}{b^2 d}+\frac {\left (\sqrt {a^2+b^2} f\right ) \int \log \left (1+\frac {2 b e^{c+d x}}{2 a+2 \sqrt {a^2+b^2}}\right ) \, dx}{b^2 d}\\ &=-\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}+\frac {(e+f x) \cosh (c+d x)}{b d}+\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {f \sinh (c+d x)}{b d^2}-\frac {\left (\sqrt {a^2+b^2} f\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 b x}{2 a-2 \sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b^2 d^2}+\frac {\left (\sqrt {a^2+b^2} f\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {2 b x}{2 a+2 \sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b^2 d^2}\\ &=-\frac {a e x}{b^2}-\frac {a f x^2}{2 b^2}+\frac {(e+f x) \cosh (c+d x)}{b d}+\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d}-\frac {\sqrt {a^2+b^2} (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d}+\frac {\sqrt {a^2+b^2} f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b^2 d^2}-\frac {\sqrt {a^2+b^2} f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b^2 d^2}-\frac {f \sinh (c+d x)}{b d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.22, size = 258, normalized size = 1.02 \begin {gather*} \frac {a (c+d x) (c f-d (2 e+f x))+2 b d (e+f x) \cosh (c+d x)+2 \sqrt {a^2+b^2} \left (-2 d e \tanh ^{-1}\left (\frac {a+b e^{c+d x}}{\sqrt {a^2+b^2}}\right )+2 c f \tanh ^{-1}\left (\frac {a+b e^{c+d x}}{\sqrt {a^2+b^2}}\right )+f (c+d x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )-f (c+d x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )+f \text {PolyLog}\left (2,\frac {b e^{c+d x}}{-a+\sqrt {a^2+b^2}}\right )-f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )\right )-2 b f \sinh (c+d x)}{2 b^2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(900\) vs.
\(2(230)=460\).
time = 3.32, size = 901, normalized size = 3.58
method | result | size |
risch | \(-\frac {a f \,x^{2}}{2 b^{2}}-\frac {a e x}{b^{2}}+\frac {\left (d x f +d e -f \right ) {\mathrm e}^{d x +c}}{2 d^{2} b}+\frac {\left (d x f +d e +f \right ) {\mathrm e}^{-d x -c}}{2 d^{2} b}-\frac {2 a^{2} e \arctanh \left (\frac {2 b \,{\mathrm e}^{d x +c}+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \,b^{2} \sqrt {a^{2}+b^{2}}}-\frac {2 e \arctanh \left (\frac {2 b \,{\mathrm e}^{d x +c}+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}+\frac {a^{2} f \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \,b^{2} \sqrt {a^{2}+b^{2}}}+\frac {a^{2} f \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} b^{2} \sqrt {a^{2}+b^{2}}}-\frac {a^{2} f \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \,b^{2} \sqrt {a^{2}+b^{2}}}-\frac {a^{2} f \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} b^{2} \sqrt {a^{2}+b^{2}}}+\frac {a^{2} f \dilog \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} b^{2} \sqrt {a^{2}+b^{2}}}-\frac {a^{2} f \dilog \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} b^{2} \sqrt {a^{2}+b^{2}}}+\frac {f \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \sqrt {a^{2}+b^{2}}}+\frac {f \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} \sqrt {a^{2}+b^{2}}}-\frac {f \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) x}{d \sqrt {a^{2}+b^{2}}}-\frac {f \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} \sqrt {a^{2}+b^{2}}}+\frac {f \dilog \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} \sqrt {a^{2}+b^{2}}}-\frac {f \dilog \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} \sqrt {a^{2}+b^{2}}}+\frac {2 a^{2} f c \arctanh \left (\frac {2 b \,{\mathrm e}^{d x +c}+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{d^{2} b^{2} \sqrt {a^{2}+b^{2}}}+\frac {2 f c \arctanh \left (\frac {2 b \,{\mathrm e}^{d x +c}+2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{d^{2} \sqrt {a^{2}+b^{2}}}\) | \(901\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 814 vs.
\(2 (232) = 464\).
time = 0.43, size = 814, normalized size = 3.23 \begin {gather*} \frac {b d f x + b d \cosh \left (1\right ) + {\left (b d f x + b d \cosh \left (1\right ) + b d \sinh \left (1\right ) - b f\right )} \cosh \left (d x + c\right )^{2} + b d \sinh \left (1\right ) + {\left (b d f x + b d \cosh \left (1\right ) + b d \sinh \left (1\right ) - b f\right )} \sinh \left (d x + c\right )^{2} + 2 \, {\left (b f \cosh \left (d x + c\right ) + b f \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) - 2 \, {\left (b f \cosh \left (d x + c\right ) + b f \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + 2 \, {\left ({\left (b c f - b d \cosh \left (1\right ) - b d \sinh \left (1\right )\right )} \cosh \left (d x + c\right ) + {\left (b c f - b d \cosh \left (1\right ) - b d \sinh \left (1\right )\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) + 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) - 2 \, {\left ({\left (b c f - b d \cosh \left (1\right ) - b d \sinh \left (1\right )\right )} \cosh \left (d x + c\right ) + {\left (b c f - b d \cosh \left (1\right ) - b d \sinh \left (1\right )\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) - 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) + 2 \, {\left ({\left (b d f x + b c f\right )} \cosh \left (d x + c\right ) + {\left (b d f x + b c f\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) - 2 \, {\left ({\left (b d f x + b c f\right )} \cosh \left (d x + c\right ) + {\left (b d f x + b c f\right )} \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) + b f - {\left (a d^{2} f x^{2} + 2 \, a d^{2} x \cosh \left (1\right ) + 2 \, a d^{2} x \sinh \left (1\right )\right )} \cosh \left (d x + c\right ) - {\left (a d^{2} f x^{2} + 2 \, a d^{2} x \cosh \left (1\right ) + 2 \, a d^{2} x \sinh \left (1\right ) - 2 \, {\left (b d f x + b d \cosh \left (1\right ) + b d \sinh \left (1\right ) - b f\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{2 \, {\left (b^{2} d^{2} \cosh \left (d x + c\right ) + b^{2} d^{2} \sinh \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\mathrm {cosh}\left (c+d\,x\right )}^2\,\left (e+f\,x\right )}{a+b\,\mathrm {sinh}\left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________